package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.OjProblemsMapper;
import com.ruoyi.system.domain.OjProblems;
import com.ruoyi.system.service.IOjProblemsService;

/**
 * OJ题目Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-29
 */
@Service
public class OjProblemsServiceImpl implements IOjProblemsService 
{
    @Autowired
    private OjProblemsMapper ojProblemsMapper;

    /**
     * 查询OJ题目
     * 
     * @param ojProblemId OJ题目主键
     * @return OJ题目
     */
    @Override
    public OjProblems selectOjProblemsByOjProblemId(Long ojProblemId)
    {
        return ojProblemsMapper.selectOjProblemsByOjProblemId(ojProblemId);
    }

    /**
     * 查询OJ题目列表
     * 
     * @param ojProblems OJ题目
     * @return OJ题目
     */
    @Override
    public List<OjProblems> selectOjProblemsList(OjProblems ojProblems)
    {
        return ojProblemsMapper.selectOjProblemsList(ojProblems);
    }

    /**
     * 新增OJ题目
     * 
     * @param ojProblems OJ题目
     * @return 结果
     */
    @Override
    public int insertOjProblems(OjProblems ojProblems)
    {
        return ojProblemsMapper.insertOjProblems(ojProblems);
    }

    /**
     * 修改OJ题目
     * 
     * @param ojProblems OJ题目
     * @return 结果
     */
    @Override
    public int updateOjProblems(OjProblems ojProblems)
    {
        return ojProblemsMapper.updateOjProblems(ojProblems);
    }

    /**
     * 批量删除OJ题目
     * 
     * @param ojProblemIds 需要删除的OJ题目主键
     * @return 结果
     */
    @Override
    public int deleteOjProblemsByOjProblemIds(Long[] ojProblemIds)
    {
        return ojProblemsMapper.deleteOjProblemsByOjProblemIds(ojProblemIds);
    }

    /**
     * 删除OJ题目信息
     * 
     * @param ojProblemId OJ题目主键
     * @return 结果
     */
    @Override
    public int deleteOjProblemsByOjProblemId(Long ojProblemId)
    {
        return ojProblemsMapper.deleteOjProblemsByOjProblemId(ojProblemId);
    }
}
